<template>
  <div>
  <el-container style="height: 500px; border: 1px solid #eee">
    <el-container>
        <el-header style="text-align: right; font-size: 12px">
          <p align="center"><font style="size: 19px;color: azure;font-family: 华文行楷">用户注册审核中心</font>
            <span style="float: right">
        <router-link :to="{name:'Mine'}">
          <i class="el-icon-back"><font style="font-size: 15px"> 返回个人中心</font></i>
        </router-link>
      </span> </p>
       </el-header>

      <el-main>
        <el-table
            :data="tableData"
            style="width: 100%">
          <el-table-column
              label="日期">
            <template slot-scope="scope">
              <i class="el-icon-time"></i>
              <span style="margin-left: 10px">{{ scope.row.date }}</span>
            </template>
          </el-table-column>
          <el-table-column
              label="用户名"
              prop="name">
          </el-table-column>
          <el-table-column
              label="电子邮件">
            <template slot-scope="scope">
              <i class="el-icon-message"></i>
              <span style="margin-left: 10px">{{ scope.row.email }}</span>
            </template>
          </el-table-column>
          <el-table-column
              label="用户学生证信息"
              width="400">
            <el-button type="text" @click="stcarddialog = true">点击查看学生证</el-button>
          </el-table-column>
          <el-table-column
              label="用户人脸信息"
              width="400">
            <el-button type="text" @click="facedialog = true">点击查看人脸信息</el-button>
          </el-table-column>
          <el-table-column label="操作">
            <template slot-scope="scope">
              <el-button
                  size="mini"
                  @click="handleEdit(scope.$index, scope.row)">通过</el-button>
              <el-button
                  size="mini"
                  type="danger"
                  @click="handleDelete(scope.$index, scope.row)">驳回</el-button>
            </template>
          </el-table-column>
        </el-table>
      </el-main>
    </el-container>
  </el-container>
    <el-dialog
        title="学生证信息"
        :visible.sync="stcarddialog"
        width="30%"
        center>
      <div>
        <p align="center"><img src="../../static/1.png" width="150" height="150"></p>
      </div>
      <span slot="footer" class="dialog-footer">
    <el-button type="primary" @click="stcarddialog = false">关闭</el-button>
  </span>
    </el-dialog>
    <el-dialog
        title="人脸信息"
        :visible.sync="facedialog"
        width="30%"
        center>
      <div>
        <p align="center"><img src="../../static/face.png" width="150" height="150"></p>
      </div>
      <span slot="footer" class="dialog-footer">
    <el-button type="primary" @click="facedialog = false">关闭</el-button>
  </span>
    </el-dialog>
  </div>
</template>

<style>
.el-header {
  background-color: #B3C0D1;
  color: #333;
  line-height: 60px;
}

</style>

<script>
export default {
  data() {
    return {
      stcarddialog:false,
      facedialog:false,
      tableData: [{
        date: '2016-05-02',
        name: '王小虎',
        address: '上海市普陀区金沙江路 1518 弄',
        email:'1@qq.com'
      }, {
        date: '2016-05-04',
        name: '张三',
        address: '上海市普陀区金沙江路 1517 弄',
        email:'2@qq.com'
      }, {
        date: '2016-05-01',
        name: '李四',
        address: '上海市普陀区金沙江路 1519 弄',
        email:'3@qq.com'
      }, {
        date: '2016-05-03',
        name: '王五',
        address: '上海市普陀区金沙江路 1516 弄',
        email:'4@qq.com'
      }]
    }
  },
  methods: {
    handleEdit(index, row) {
      console.log(index, row);
    },
    handleDelete(index, row) {
      console.log(index, row);
    }
  }
}
</script>
